<!DOCTYPE html>
<html>
  <head>
  <meta charset='UTF-8'>
  <title>Atom API Documentation</title>
  <link rel='stylesheet' href='../assets/biscotto.css' type='text/css'>
  <script src='../assets/biscotto.js'></script>
  <script src='../assets/search_data.js'></script>
</head>
  <body>
    <div id='base' data-path='..&#47;'></div>
<div id='header'>
  <div id='menu'>
    <a href='../docs/README.md.html' title='Atom'>Atom</a>
    &raquo;
    <a href='../class_index.html' title='Index'>Index</a>
    &raquo;
    <span class='title'>Config</span>
    <nav>
      <ul>
        <li class='noframes'>
          (<a class='noframes' href='Config.html#'>no frames</a>)
        </li>
      </ul>
    </nav>
    <div id='search'>
      <a id='class_list_link' href='../class_list.html'>Classes</a>
      <a id='file_list_link' href='../file_list.html'>Files</a>
      <a id='method_list_link' href='../method_list.html'>Methods</a>
      <a id='extra_list_link' href='../extra_list.html'>Extras</a>
    </div>
  </div>
  <iframe id='search_frame'></iframe>
  <div id='fuzzySearch'>
    <input type='text'>
    <ol></ol>
  </div>
  <div id='help'>
    <p>
      Quickly fuzzy find classes, mixins, methods, file:
    </p>
    <ul>
      <li>
        <span>Ctrl-T</span>
        Open fuzzy finder dialog
      </li>
    </ul>
    <p>
      In frame mode you can toggle the list naviation frame on the left side:
    </p>
    <ul>
      <li>
        <span>Ctrl-L</span>
        Toggle list view
      </li>
    </ul>
    <p>
      You can focus a list in frame mode or toggle a tab in frameless mode:
    </p>
    <ul>
      <li>
        <span>Ctrl-C</span>
        Class list
      </li>
      <li>
        <span>Ctrl-I</span>
        Mixin list
      </li>
      <li>
        <span>Ctrl-F</span>
        File list
      </li>
      <li>
        <span>Ctrl-M</span>
        Method list
      </li>
      <li>
        <span>Ctrl-E</span>
        Extras list
      </li>
    </ul>
    <p>
      You can focus and blur the search input:
    </p>
    <ul>
      <li>
        <span>Ctrl-S</span>
        Focus search input
      </li>
      <li>
        <span>Esc</span>
        Blur search input
      </li>
    </ul>
    <p>
      In frameless mode you can close the list tab:
    </p>
    <ul>
      <li>
        <span>Esc</span>
        Close list tab
      </li>
    </ul>
  </div>
</div>
    <div id='content'>
      <h1>
        Class
        Config
      </h1>
      <div class='stability-1'>
        <span class='heading'></span>
        <div class='message'></div>
      </div>
      <table class='box'>
        <tr>
          <td>Defined in:</td>
          <td>src&#47;config.coffee</td>
        </tr>
      </table>
      <h2>Overview</h2>
      <div class='docstring'>
  <p>Used to access all of Atom&#39;s configuration details.</p><p>An instance of this class is always available as the <code>atom.config</code> global.</p><h2 id="best-practices">Best practices</h2>
<ul>
<li>Create your own root keypath using your package&#39;s name.</li>
<li>Don&#39;t depend on (or write to) configuration keys outside of your keypath.</li>
</ul>
<h2 id="example">Example</h2>
<pre><code class="lang-coffeescript">atom.config.set(&#39;myplugin.key&#39;, &#39;value&#39;)
atom.config.observe &#39;myplugin.key&#39;, -&gt;
  console.log &#39;My configuration changed:&#39;, atom.config.get(&#39;myplugin.key&#39;)
</code></pre>

</div>
<div class='tags'>
</div>
      <h2>Instance Method Summary</h2>
      <ul class='summary'>
  <li>
    <span class='signature'>
      <a href='Config.html#get-instance'>
        ::<strong>get</strong>(keyPath)
      </a>
    </span>
    <span class='desc'>
      Retrieves the setting for the given key.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#getInt-instance'>
        ::<strong>getInt</strong>(keyPath)
      </a>
    </span>
    <span class='desc'>
      Retrieves the setting for the given key as an integer.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#getPositiveInt-instance'>
        ::<strong>getPositiveInt</strong>(keyPath, defaultValue = 0)
      </a>
    </span>
    <span class='desc'>
      Retrieves the setting for the given key as a positive integer.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#getSettings-instance'>
        ::<strong>getSettings</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns a new <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> containing all of settings and defaults.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#getUserConfigPath-instance'>
        ::<strong>getUserConfigPath</strong>()
      </a>
    </span>
    <span class='desc'>
      Get the path to the config file being used.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#observe-instance'>
        Object ::<strong>observe</strong>(keyPath, options = {}, callback)
      </a>
    </span>
    <span class='desc'>
      Establishes an event listener for a given key.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#pushAtKeyPath-instance'>
        ::<strong>pushAtKeyPath</strong>(keyPath, value)
      </a>
    </span>
    <span class='desc'>
      Push the value to the array at the key path.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#removeAtKeyPath-instance'>
        ::<strong>removeAtKeyPath</strong>(keyPath, value)
      </a>
    </span>
    <span class='desc'>
      Remove the value from the array at the key path.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#restoreDefault-instance'>
        ::<strong>restoreDefault</strong>(keyPath)
      </a>
    </span>
    <span class='desc'>
      Restore the key path to its default value.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#set-instance'>
        ::<strong>set</strong>(keyPath, value)
      </a>
    </span>
    <span class='desc'>
      Sets the value for a configuration setting.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#toggle-instance'>
        ::<strong>toggle</strong>(keyPath)
      </a>
    </span>
    <span class='desc'>
      Toggle the value at the key path.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#unobserve-instance'>
        ::<strong>unobserve</strong>(keyPath)
      </a>
    </span>
    <span class='desc'>
      Unobserve all callbacks on a given key
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='Config.html#unshiftAtKeyPath-instance'>
        ::<strong>unshiftAtKeyPath</strong>(keyPath, value)
      </a>
    </span>
    <span class='desc'>
      Add the value to the beginning of the array at the key path.
    </span>
  </li>
</ul>
      <h2>Instance Method Details</h2>
      <div class='methods'>
  <div class='method_details'>
    <p class='signature' id='get-instance'>
      ::<strong>get</strong>(keyPath)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Retrieves the setting for the given key.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> name of the key to retrieve</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the value from Atom&#39;s default settings, the user&#39;s configuration file,
or `null` if the key doesn't exist in either.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getInt-instance'>
      ::<strong>getInt</strong>(keyPath)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Retrieves the setting for the given key as an integer.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> name of the key to retrieve</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the value from Atom&#39;s default settings, the user&#39;s configuration file,
or `NaN` if the key doesn't exist in either.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getPositiveInt-instance'>
      ::<strong>getPositiveInt</strong>(keyPath, defaultValue = 0)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Retrieves the setting for the given key as a positive integer.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> name of the key to retrieve</span>
    </li>
    <li>
      <span class='type'>(Number)</span>
      <span class='name'>defaultValue</span>
      &mdash;
      <span class='desc'>The integer <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number'>Number</a> to fall back to if the value isn&#39;t positive, defaults to 0.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the value from Atom&#39;s default settings, the user&#39;s configuration file,
or `defaultValue` if the key value isn't greater than zero.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getSettings-instance'>
      ::<strong>getSettings</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns a new <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> containing all of settings and defaults.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getUserConfigPath-instance'>
      ::<strong>getUserConfigPath</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Get the path to the config file being used.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='observe-instance'>
      Object ::<strong>observe</strong>(keyPath, options = {}, callback)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Establishes an event listener for a given key.</p><p><code>callback</code> is fired whenever the value of the key is changed and will
 be fired immediately unless the <code>callNow</code> option is <code>false</code>.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> name of the key to observe</span>
    </li>
    <li>
      <span class='type'>(Object)</span>
      <span class='name'>options</span>
      &mdash;
      <span class='desc'>An optional <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> containing the <code>callNow</code> key.</span>
    </li>
    <li>
      <span class='type'>(Function)</span>
      <span class='name'>callback</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function'>Function</a> that fires when the. It is given a single argument, <code>value</code>, which is the new value of <code>keyPath</code>.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      (<tt>Object</tt>)
      &mdash;
      <span class='desc'>Returns an <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object'>Object</a> with the following keys:</span>
      <ul class='options'>
        <li>
          <span class='type'>(Function)</span>
          <span class='name'>off</span>
          &mdash;
          <span class='desc'>A <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function'>Function</a> that unobserves the `keyPath` with called.</span>
        </li>
      </ul>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='pushAtKeyPath-instance'>
      ::<strong>pushAtKeyPath</strong>(keyPath, value)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Push the value to the array at the key path.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> key path.</span>
    </li>
    <li>
      <span class='name'>value</span>
      &mdash;
      <span class='desc'>The value to push to the array.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the new array length of the setting.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='removeAtKeyPath-instance'>
      ::<strong>removeAtKeyPath</strong>(keyPath, value)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Remove the value from the array at the key path.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> key path.</span>
    </li>
    <li>
      <span class='name'>value</span>
      &mdash;
      <span class='desc'>The value to remove from the array.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the new array value of the setting.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='restoreDefault-instance'>
      ::<strong>restoreDefault</strong>(keyPath)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Restore the key path to its default value.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> name of the key.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the new value.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='set-instance'>
      ::<strong>set</strong>(keyPath, value)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Sets the value for a configuration setting.</p><p>This value is stored in Atom&#39;s internal configuration file.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> name of the key</span>
    </li>
    <li>
      <span class='name'>value</span>
      &mdash;
      <span class='desc'>The value of the setting</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the <code>value</code>.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='toggle-instance'>
      ::<strong>toggle</strong>(keyPath)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Toggle the value at the key path.</p><p>The new value will be <code>true</code> if the value is currently falsy and will be
<code>false</code> if the value is currently truthy.</p>
</div>
<div class='tags'>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the new value.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='unobserve-instance'>
      ::<strong>unobserve</strong>(keyPath)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Unobserve all callbacks on a given key</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> name of the key to unobserve</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='unshiftAtKeyPath-instance'>
      ::<strong>unshiftAtKeyPath</strong>(keyPath, value)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Add the value to the beginning of the array at the key path.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>keyPath</span>
      &mdash;
      <span class='desc'>The <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> key path.</span>
    </li>
    <li>
      <span class='name'>value</span>
      &mdash;
      <span class='desc'>The value to shift onto the array.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns the new array length of the setting.</span>
    </li>
  </ul>
</div>
  </div>
</div>
    </div>
    <div id='footer'>
  Generated on
  Thu Feb 27 2014 16:02:52 GMT-0800 (PST)
  by
  <a href='https://github.com/gjtorikian/biscotto' title='TomDoc-CoffeeScript API documentation generator'>Biscotto</a>
  v2.1.0
  (Node.js v0.10.21).
  &#10034;
  Press Ctrl-h to see the keyboard shortcuts
</div>
  </body>
</html>